package com.wu.backend.mapper;

import com.wu.backend.entity.NewEnergyChargeWeekPerson;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NewEnergyChargeWeekPersonMapper {
    @Select("SELECT * FROM new_energy_chargy_weekbyperson " +
            "ORDER BY CASE " +
            "    WHEN week = 'Mon' THEN 1 " +
            "    WHEN week = 'Tue' THEN 2 " +
            "    WHEN week = 'Wed' THEN 3 " +
            "    WHEN week = 'Thu' THEN 4 " +
            "    WHEN week = 'Fri' THEN 5 " +
            "    WHEN week = 'Sat' THEN 6 " +
            "    WHEN week = 'Sun' THEN 7 " +
            "END")
    List<NewEnergyChargeWeekPerson> queryNewEnergyChargeWeekPerson();
}
